博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phpcms导航栏多个栏目调用
阅读量:6863 次
发布时间:2019-06-26

本文共 1899 字,大约阅读时间需要 6 分钟。

做网站时用的到的简单的栏目导航()

phpcms多个栏目catid in(9,10,11)可以修改id

排序order by listorder ASC/DESC

{if}...{/if}为判断点击为栏目

下面是一种例子

html:

    {pc:get sql="select * from v9_category where catid in(9,10,17,11,12,13,14,15) order by listorder ASC" siteid="$siteid" return="data"} {loop $data $r}
    {/loop}{/pc}

css:

.navb{
float: left; height: 38px; line-height: 38px; margin-top: 4px; width: 99px;}.nabout{
color:#fff; font-size:14px; display:inline-block; width:99px; text-align:center; text-decoration:none; height:38px;line-height:38px; font-weight:bold; }.nabout:hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold;}.nhome{
width:99px; color:#fff; /*background:url(navb.jpg) repeat-x;*/ display:inline-block; height:45px;line-height:38px; margin:0px; text-decoration:none; font-size:14px;font-weight:bold; }.nhome:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }.hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold; font-size:14px;} .hover:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }

效果:

转载于:https://www.cnblogs.com/chervehong/p/10373277.html

你可能感兴趣的文章
新浪微博注册器 采用httpwebrequest请求
查看>>
lua脚本分解字符串
查看>>
WP 图片加载时显示加载中
查看>>
Hive之 hive的三种使用方式(CLI、HWI、Thrift)
查看>>
oracle 表空间总结
查看>>
NYOJ260数数小木块
查看>>
Android 数据存储
查看>>
CTreeCtl的使用
查看>>
不错的网站链接
查看>>
POJ 1742
查看>>
post方法
查看>>
21、ActionBar & Notification
查看>>
步步为营:Asp.net 通用数据容器的缺陷
查看>>
判断整除(动态规划,递推)
查看>>
题解 P1004 【方格取数】
查看>>
【OCP-052】052最新考试题库分析整理-第7题
查看>>
vuex相关(actions和mutation的异曲同工)
查看>>
Linux常用命令总结
查看>>
即时通讯软件的发展演变
查看>>
java基础总结
查看>>